package com.nefu.editor.core.mapper;

import com.nefu.editor.core.mapper.provider.CartProvider;
import com.nefu.editor.core.model.Cart;
import com.nefu.editor.core.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author chenchenT
 * @date : 18-11-14
 * @since : java 8
 */
@Mapper
@Repository
public interface CartMapper {

    /**
     * 根据用户Id获取购物车
     * @param user
     * @return
     */
    @SelectProvider(type = CartProvider.class, method = "selectCartByUserSystemId")
    List<Cart> selectCartByUserSystemId(User user);

}
